package 简单.二叉树的最大深度;
//递归
public class Solution1 {
    public int maxDepth(TreeNode root) {
        int max = 0;
        if(root == null) return  0;
        int left = maxDepth(root.left);
        int right = maxDepth(root.right);
        max = Math.max(left,right) + 1;
        return max;

    }
}
